//
//  EGBaseViewController.m
//  Orchard
//
//  Created by 黄勇锋 on 16/8/20.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "EGBaseViewController.h"
#import "EGSearchController.h"
#import "EGTwodemensionController.h"


@implementation EGBaseViewController

- (void)viewDidLoad{
    
    [super viewDidLoad];
    
    [self setupNav];
    
}


- (void)setupNav{
    
    
    
    
    self.navigationItem.title = @"人民大会堂";
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"scanicon"] style:UIBarButtonItemStylePlain target:self action:@selector(twoDimensionClick)];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"icon_search"] style:UIBarButtonItemStylePlain target:self action:@selector(searchClick)];
    
}

#pragma mark - 搜索关键字
- (void)searchClick{
    
    EGSearchController *searchVc = [[EGSearchController alloc]init];
    
    [self.navigationController pushViewController:searchVc animated:YES];
}


#pragma mark - 点击扫描二维码
- (void)twoDimensionClick{
    
    EGTwodemensionController *twoDemensionVc = [[EGTwodemensionController alloc]init];
    
    [self.navigationController pushViewController:twoDemensionVc animated:YES];
}



@end
